package com.zhiyun.yycall;

import android.app.Application;

import com.gzit.store.StoreManager;
import com.gzit.utils.AndroidUtils;
import com.zhiyun.net.HttpRemoter;
import com.zhiyun.store.CallLogItem;
import com.zhiyun.yycall.version.VersionManager;

public class YYCallApplication extends Application {

	@Override
	public void onCreate() {
		super.onCreate();

		AndroidUtils.regAppContext(this);

		Config.load();

		// YYCallScreen2.getInstance().init(this);

		initDB();

		VersionManager.getInstance().initContext(this);

	}

	private void initDB() {
		StoreManager.dbName("callbackuu");
		StoreManager.dbVersion(1);
		StoreManager.regStores(CallLogItem.DUMY);
		StoreManager.instance = new StoreManager(this);
	}

	@Override
	public void onTerminate() {
		super.onTerminate();
		HttpRemoter.shutdownRemoters();

	}

}
